package com.galaxy.device.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.vo.DeviceBaseVo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 设备位置对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("device_location")
public class DeviceLocation extends BaseEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 设备ID
     */
    private Long deviceId;

    /**
     * 位置描述
     */
    private String location;

    /**
     * 详细地址
     */
    private String address;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 经度
     */
    private BigDecimal longitude;

    private Long status;

    /**
     * 设备信息
     */
    @TableField(exist = false)
    private DeviceBaseVo device;
}
